<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/9
 * Time: 15:48
 */

require_once "dataSQL.php";
require_once "rootDB.php";
$adminDb=new rootDB();
$admin=$_POST['admin'];
    $data=$adminDb->query_admin($admin);
try{
    $res=$data;
    if($res) {
        $dat = array(
            "message" => "用户已经存在",
        );
        echo json_encode($dat);
    }
    else{

        echo "账号可用";

    }


}
catch (Exception $e){

    echo $e->getMessage();
}
